<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QGestureEvent Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QGestureEvent Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QGestureEvent class provides the description of triggered
gestures. <a href="#details">More...</a></p>

<p>Inherits <a href="qevent.html">QEvent</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qgestureevent.html#QGestureEvent">__init__</a></b> (<i>self</i>, list-of-QGesture&#160;<i>gestures</i>)</li><li><div class="fn" /><b><a href="qgestureevent.html#QGestureEvent-2">__init__</a></b> (<i>self</i>, QGestureEvent)</li><li><div class="fn" /><b><a href="qgestureevent.html#accept">accept</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgestureevent.html#accept-2">accept</a></b> (<i>self</i>, QGesture)</li><li><div class="fn" /><b><a href="qgestureevent.html#accept-3">accept</a></b> (<i>self</i>, Qt.GestureType)</li><li><div class="fn" />list-of-QGesture <b><a href="qgestureevent.html#activeGestures">activeGestures</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QGesture <b><a href="qgestureevent.html#canceledGestures">canceledGestures</a></b> (<i>self</i>)</li><li><div class="fn" />QGesture <b><a href="qgestureevent.html#gesture">gesture</a></b> (<i>self</i>, Qt.GestureType&#160;<i>type</i>)</li><li><div class="fn" />list-of-QGesture <b><a href="qgestureevent.html#gestures">gestures</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgestureevent.html#ignore">ignore</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgestureevent.html#ignore-2">ignore</a></b> (<i>self</i>, QGesture)</li><li><div class="fn" /><b><a href="qgestureevent.html#ignore-3">ignore</a></b> (<i>self</i>, Qt.GestureType)</li><li><div class="fn" />bool <b><a href="qgestureevent.html#isAccepted">isAccepted</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qgestureevent.html#isAccepted-2">isAccepted</a></b> (<i>self</i>, QGesture)</li><li><div class="fn" />bool <b><a href="qgestureevent.html#isAccepted-3">isAccepted</a></b> (<i>self</i>, Qt.GestureType)</li><li><div class="fn" />QPointF <b><a href="qgestureevent.html#mapToGraphicsScene">mapToGraphicsScene</a></b> (<i>self</i>, QPointF&#160;<i>gesturePoint</i>)</li><li><div class="fn" /><b><a href="qgestureevent.html#setAccepted">setAccepted</a></b> (<i>self</i>, bool&#160;<i>accepted</i>)</li><li><div class="fn" /><b><a href="qgestureevent.html#setAccepted-2">setAccepted</a></b> (<i>self</i>, QGesture, bool)</li><li><div class="fn" /><b><a href="qgestureevent.html#setAccepted-3">setAccepted</a></b> (<i>self</i>, Qt.GestureType, bool)</li><li><div class="fn" />QWidget <b><a href="qgestureevent.html#widget">widget</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGestureEvent class provides the description of triggered
gestures.</p>
<p>The QGestureEvent class contains a list of gestures, which can
be obtained using the <a href="qgestureevent.html#gestures">gestures</a>() function.</p>
<p>The gestures are either active or canceled. A list of those that
are currently being executed can be obtained using the <a href="qgestureevent.html#activeGestures">activeGestures</a>() function.
A list of those which were previously active and have been canceled
can be accessed using the <a href="qgestureevent.html#canceledGestures">canceledGestures</a>()
function. A gesture might be canceled if the current window loses
focus, for example, or because of a timeout, or for other
reasons.</p>
<p>If the event handler does not accept the event by calling the
generic <a href="qevent.html#accept">QEvent.accept</a>() function,
all individual <a href="qgesture.html">QGesture</a> object that
were not accepted and in the <a href="qt.html#GestureState-enum">Qt.GestureStarted</a> state will be
propagated up the parent widget chain until a widget accepts them
individually, by calling <a href="qgestureevent.html#accept">QGestureEvent.accept</a>() for each of
them, or an event filter consumes the event.</p>
<a id="further-reading" name="further-reading" />
<h3>Further Reading</h3>
<p>For an overview of gesture handling in Qt and information on
using gestures in your applications, see the <a href="gestures-overview.html">Gestures Programming</a> document.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGestureEvent" />QGestureEvent.__init__ (<i>self</i>, list-of-QGesture&#160;<i>gestures</i>)</h3><p>Creates new <a href="qgestureevent.html">QGestureEvent</a>
containing a list of <i>gestures</i>.</p>


<h3 class="fn"><a name="QGestureEvent-2" />QGestureEvent.__init__ (<i>self</i>, <a href="qgestureevent.html">QGestureEvent</a>)</h3><h3 class="fn"><a name="accept" />QGestureEvent.accept (<i>self</i>)</h3><p>Accepts the event, the equivalent of calling
setAccepted(true).</p>
<p><b>See also</b> <a href="qevent.html#accept">QEvent.accept</a>().</p>


<h3 class="fn"><a name="accept-2" />QGestureEvent.accept (<i>self</i>, <a href="qgesture.html">QGesture</a>)</h3><p>Sets the accept flag of the given <i>gesture</i> object, the
equivalent of calling <a href="qgestureevent.html#setAccepted">setAccepted(gesture,
true)</a>.</p>
<p>Setting the accept flag indicates that the event receiver wants
the gesture. Unwanted gestures may be propagated to the parent
widget.</p>
<p><b>See also</b> <a href="qgestureevent.html#ignore">QGestureEvent.ignore</a>().</p>


<h3 class="fn"><a name="accept-3" />QGestureEvent.accept (<i>self</i>, <a href="qt.html#GestureType-enum">Qt.GestureType</a>)</h3><p>Sets the accept flag of the given <i>gestureType</i>, the
equivalent of calling <a href="qgestureevent.html#setAccepted">setAccepted(gestureType,
true)</a>.</p>
<p>Setting the accept flag indicates that the event receiver wants
the gesture. Unwanted gestures may be propagated to the parent
widget.</p>
<p><b>See also</b> <a href="qgestureevent.html#ignore">QGestureEvent.ignore</a>().</p>


<h3 class="fn"><a name="activeGestures" />list-of-QGesture QGestureEvent.activeGestures (<i>self</i>)</h3><p>Returns a list of active (not canceled) gestures.</p>


<h3 class="fn"><a name="canceledGestures" />list-of-QGesture QGestureEvent.canceledGestures (<i>self</i>)</h3><p>Returns a list of canceled gestures.</p>


<h3 class="fn"><a name="gesture" /><a href="qgesture.html">QGesture</a> QGestureEvent.gesture (<i>self</i>, <a href="qt.html#GestureType-enum">Qt.GestureType</a>&#160;<i>type</i>)</h3><p>Returns a gesture object by <i>type</i>.</p>


<h3 class="fn"><a name="gestures" />list-of-QGesture QGestureEvent.gestures (<i>self</i>)</h3><p>Returns all gestures that are delivered in the event.</p>


<h3 class="fn"><a name="ignore" />QGestureEvent.ignore (<i>self</i>)</h3><p>Ignores the event, the equivalent of calling
setAccepted(false).</p>
<p><b>See also</b> <a href="qevent.html#ignore">QEvent.ignore</a>().</p>


<h3 class="fn"><a name="ignore-2" />QGestureEvent.ignore (<i>self</i>, <a href="qgesture.html">QGesture</a>)</h3><p>Clears the accept flag parameter of the given <i>gesture</i>
object, the equivalent of calling <a href="qgestureevent.html#setAccepted">setAccepted(gesture,
false)</a>.</p>
<p>Clearing the accept flag indicates that the event receiver does
not want the gesture. Unwanted gestures may be propagated to the
parent widget.</p>
<p><b>See also</b> <a href="qgestureevent.html#accept">QGestureEvent.accept</a>().</p>


<h3 class="fn"><a name="ignore-3" />QGestureEvent.ignore (<i>self</i>, <a href="qt.html#GestureType-enum">Qt.GestureType</a>)</h3><p>Clears the accept flag parameter of the given
<i>gestureType</i>, the equivalent of calling <a href="qgestureevent.html#setAccepted">setAccepted(gesture,
false)</a>.</p>
<p>Clearing the accept flag indicates that the event receiver does
not want the gesture. Unwanted gestures may be propgated to the
parent widget.</p>
<p><b>See also</b> <a href="qgestureevent.html#accept">QGestureEvent.accept</a>().</p>


<h3 class="fn"><a name="isAccepted" />bool QGestureEvent.isAccepted (<i>self</i>)</h3><p>Returns true is the event has been accepted; otherwise returns
false.</p>
<p><b>See also</b> <a href="qevent.html#accepted-prop">QEvent.accepted</a>.</p>


<h3 class="fn"><a name="isAccepted-2" />bool QGestureEvent.isAccepted (<i>self</i>, <a href="qgesture.html">QGesture</a>)</h3><p>Returns true if the <i>gesture</i> is accepted; otherwise
returns false.</p>


<h3 class="fn"><a name="isAccepted-3" />bool QGestureEvent.isAccepted (<i>self</i>, <a href="qt.html#GestureType-enum">Qt.GestureType</a>)</h3><p>Returns true if the gesture of type <i>gestureType</i> is
accepted; otherwise returns false.</p>


<h3 class="fn"><a name="mapToGraphicsScene" /><a href="qpointf.html">QPointF</a> QGestureEvent.mapToGraphicsScene (<i>self</i>, <a href="qpointf.html">QPointF</a>&#160;<i>gesturePoint</i>)</h3><p>Returns the scene-local coordinates if the <i>gesturePoint</i>
is inside a graphics view.</p>
<p>This functional might be useful when the gesture event is
delivered to a <a href="qgraphicsobject.html">QGraphicsObject</a>
to translate a point in screen coordinates to scene-local
coordinates.</p>
<p><b>See also</b> <a href="qpointf.html#isNull">QPointF.isNull</a>() and <a href="index.html">.</a>.</p>


<h3 class="fn"><a name="setAccepted" />QGestureEvent.setAccepted (<i>self</i>, bool&#160;<i>accepted</i>)</h3><p>Sets or clears the event's internal flag that determines whether
it should be delivered to other objects.</p>
<p>Calling this function with a value of true for <i>accepted</i>
indicates that the caller has accepted the event and that it should
not be propagated further. Calling this function with a value of
false indicates that the caller has ignored the event and that it
should be delivered to other objects.</p>
<p>For convenience, the accept flag can also be set with <a href="qgestureevent.html#accept">accept</a>(), and cleared with <a href="qgestureevent.html#ignore">ignore</a>().</p>
<p><b>See also</b> <a href="qgestureevent.html#isAccepted">isAccepted</a>() and <a href="qevent.html#accepted-prop">QEvent.accepted</a>.</p>


<h3 class="fn"><a name="setAccepted-2" />QGestureEvent.setAccepted (<i>self</i>, <a href="qgesture.html">QGesture</a>, bool)</h3><p>Sets the accept flag of the given <i>gesture</i> object to the
specified <i>value</i>.</p>
<p>Setting the accept flag indicates that the event receiver wants
the <i>gesture</i>. Unwanted gestures may be propagated to the
parent widget.</p>
<p>By default, gestures in events of type <a href="qevent.html#Type-enum">QEvent.Gesture</a> are accepted, and
gestures in <a href="qevent.html#Type-enum">QEvent.GestureOverride</a> events are
ignored.</p>
<p>For convenience, the accept flag can also be set with <a href="qgestureevent.html#accept">accept</a>(gesture), and cleared with
<a href="qgestureevent.html#ignore">ignore</a>(gesture).</p>


<h3 class="fn"><a name="setAccepted-3" />QGestureEvent.setAccepted (<i>self</i>, <a href="qt.html#GestureType-enum">Qt.GestureType</a>, bool)</h3><p>Sets the accept flag of the given <i>gestureType</i> object to
the specified <i>value</i>.</p>
<p>Setting the accept flag indicates that the event receiver wants
to receive gestures of the specified type, <i>gestureType</i>.
Unwanted gestures may be propagated to the parent widget.</p>
<p>By default, gestures in events of type <a href="qevent.html#Type-enum">QEvent.Gesture</a> are accepted, and
gestures in <a href="qevent.html#Type-enum">QEvent.GestureOverride</a> events are
ignored.</p>
<p>For convenience, the accept flag can also be set with <a href="qgestureevent.html#accept">accept</a>(gestureType), and cleared
with <a href="qgestureevent.html#ignore">ignore</a>(gestureType).</p>


<h3 class="fn"><a name="widget" /><a href="qwidget.html">QWidget</a> QGestureEvent.widget (<i>self</i>)</h3><p>Returns the widget on which the event occurred.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.9.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2011</td><td align="right" width="25%">Qt&#160;4.8.0</td></tr></table></div></address></body></html>